package org.example.thread;

import org.example.dto.SysDto;
import org.springframework.context.ApplicationListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
public class AsynEventHandler implements ApplicationListener<SysDto> {
    @Async("taskExecutor")
    @Override
    public void onApplicationEvent(SysDto event) {
        if(event == null){
            return;
        }
        System.out.println("----------执行逻辑");
    }
}
